package o;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.huawei.appgallery.productpurchase.impl.processor.IapJumpActivity;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;
import com.huawei.hms.support.api.iap.GetBuyIntentResult;
import com.huawei.updatesdk.service.otaupdate.UpdateKey;

public class crt implements IServerCallBack {
    private GetBuyIntentResult ˊ;
    private Context ˎ;

    public crt(Context context, GetBuyIntentResult getBuyIntentResult) {
        this.ˎ = context;
        this.ˊ = getBuyIntentResult;
    }

    public void prePostResult(BaseRequest o_cvu, ResponseBean responseBean) {
    }

    public void notifyResult(BaseRequest o_cvu, ResponseBean responseBean) {
        if (responseBean.getRtnCode_() == 0 && responseBean.getResponseCode() == 0) {
            Intent intent = new Intent(this.ˎ, IapJumpActivity.class);
            if (!(this.ˎ instanceof Activity)) {
                intent.addFlags(268435456);
            }
            intent.putExtra("jump_type", 3);
            Bundle bundle = new Bundle();
            bundle.putParcelable(UpdateKey.STATUS, this.ˊ.getStatus());
            intent.putExtra("status_bundle", bundle);
            this.ˎ.startActivity(intent);
            return;
        }
        crf.ˎ.ˏ("OrderCreationCallBack", "status=" + responseBean.getRtnCode_());
        cso.ˎ(responseBean.getResponseCode(), responseBean.getRtnCode_(), false);
    }
}
